﻿CREATE TABLE [dbo].[L_Reimbursement_Item] (
    [id]          INT             IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL,
    [Pid]         INT             CONSTRAINT [DF_L_Reimbursement_Item_Pid] DEFAULT ((0)) NULL,
    [Reason]      NVARCHAR (500)  CONSTRAINT [DF_L_Reimbursement_Item_Reason] DEFAULT ('') NULL,
    [Prices]      DECIMAL (18, 2) CONSTRAINT [DF_L_Reimbursement_Item_Prices] DEFAULT ((0)) NULL,
    [userid]      VARCHAR (10)    CONSTRAINT [DF_L_Reimbursement_Item_userid] DEFAULT ('') NULL,
    [lrrq]        DATETIME        CONSTRAINT [DF_L_Reimbursement_Item_lrrq] DEFAULT (getdate()) NULL,
    [CateOneId]   INT             CONSTRAINT [DF_L_Reimbursement_Item_CateOneId] DEFAULT ((0)) NULL,
    [CateOneName] NVARCHAR (50)   CONSTRAINT [DF_L_Reimbursement_Item_CateOneName] DEFAULT ('') NULL,
    [CateTwoId]   INT             CONSTRAINT [DF_L_Reimbursement_Item_CateTwoId] DEFAULT ((0)) NULL,
    [CateTwoName] NVARCHAR (50)   CONSTRAINT [DF_L_Reimbursement_Item_CateTwoName] DEFAULT ('') NULL,
    [SubjectId]   INT             CONSTRAINT [DF_L_Reimbursement_Item_SubjectId] DEFAULT ((0)) NULL,
    [SubjectName] NVARCHAR (50)   CONSTRAINT [DF_L_Reimbursement_Item_SubjectName] DEFAULT ('') NULL,
    [A_tx]        INT             CONSTRAINT [DF_L_Reimbursement_Item_A_tx_1] DEFAULT ((0)) NULL,
    [Pjbh]        VARCHAR (50)    CONSTRAINT [DF_L_Reimbursement_Item_Pjbh] DEFAULT ('') NULL,
    CONSTRAINT [PK_L_Reimbursement_Item] PRIMARY KEY CLUSTERED ([id] ASC)
);


GO
CREATE NONCLUSTERED INDEX [EFS_IX_L_Reimbursement_Item_a1ad967b41b64f2280e53c80e5fc9b71]
    ON [dbo].[L_Reimbursement_Item]([Pid] ASC);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'报销申请ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'Pid';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'事由', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'Reason';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'金额', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'Prices';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'录入人编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'userid';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'录入日期', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'lrrq';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'一级科目ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'CateOneId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'一级科目名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'CateOneName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'二级科目ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'CateTwoId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'二级科目名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'CateTwoName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'三级科目ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'SubjectId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'三级科目名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'SubjectName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'是否摊销（0：不摊销；1：摊销）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'A_tx';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'票据编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Reimbursement_Item', @level2type = N'COLUMN', @level2name = N'Pjbh';

